package _3ChapterThree._2ReplaceDataValueWithObject.oldObject;

import java.util.List;

public class Order {
    private String _customer;

    public Order(String _customer) {
        this._customer = _customer;
    }

    public String get_customer() {
        return _customer;
    }

    public void set_customer(String _customer) {
        this._customer = _customer;
    }

    private static int numberOfOrderFor(List<Order> orders, String customer) {
        return (int) orders.stream().filter(order -> order.get_customer().equals(customer)).count();
    }
}
